package com.yeyks.wxpay.impl;

import com.yeyks.wxpay.IWXPayDomain;
import com.yeyks.wxpay.WXPayConfig;
import com.yeyks.wxpay.IWXPayDomain;
import com.yeyks.wxpay.WXPayConfig;

import java.io.InputStream;

public class MyConfig extends WXPayConfig {

    private String appID = "wxfcdb77a8210d27ab", secret = "a818f87ffa555a93621c17900a477bb5";

    public void setAppID(String appID) {
        this.appID = appID;
    }

    public void setSecret(String secret) {
        this.secret = secret;
    }

    public String getAppID() {
        return appID;
    }

    public String getMchID() {
//        return "1513250821";
        return "1528638571";
    }

    public String getKey() {
//        return "YEYUKUAISUpay2018YEYUKUAISUpay20";
        return "86799C8837333475C82F3FE33FFE7EE3";
    }

    public String getSecret() { return secret; }

    public InputStream getCertStream() {
        return null;
    }

    public IWXPayDomain getWXPayDomain() {
        return new IWXPayDomain() {
            public void report(String domain, long elapsedTimeMillis, Exception ex) {

            }

            public DomainInfo getDomain(WXPayConfig config) {
                return new DomainInfo("api.mch.weixin.qq.com", true);
            }
        };
    }

    public int getHttpConnectTimeoutMs() {
        return 8000;
    }

    public int getHttpReadTimeoutMs() {
        return 10000;
    }
}